local Class = require('lua.lang.Class')
local RuntimeException = require('lua.lang.RuntimeException')

--- @class LuaError : RuntimeException
--- @field level number
--- @field fileline string
--- @field traceback string
--- @field cause string
--- @field file string
--- @field line number
--- @field object LuaValue
--- @field prefix string
--- @field detailMessage string
local LuaError = Class {
	__extends = RuntimeException
}

LuaError.MAX_STRING_LEN = 124
LuaError.serialVersionUID = 1

--- @constructor
--- @param message string
--- @return LuaError
function LuaError:new(message)
	--- @type LuaError
	local o = {
		message = message,
		level = 1,
		line = 0
	}
	return setmetatable(o, LuaError)
end

return LuaError